package com.demo.其它;

public class DaXIao {

    private static int daxiao(int[] arr, int top, int tail) {
        if (top == tail) {
            return arr[top];
        }
        int m = (top + tail)>>1;
        int a = daxiao(arr, top, m);
        int b = daxiao(arr, m+1, tail);
        return Math.min(a, b);
    }

    public static void main(String[] args) {
        int[] arr = {6, 7, 5, 9, 15, 0, 56, 3};
        System.out.println(daxiao(arr, 0, arr.length-1));
    }
}
